import Vue from 'vue'
import App from './App.vue'


/**
 * 1. 引入组件
 * 2. 路由初始化
 * 3. 路由规则编写
 * 4. 注册到vue实例
 */

import My from './views/My.vue'
import Friend from './views/Friend.vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter) // 初始化

const router = new VueRouter({
  // routes 规则们
  // route  一条规则

  routes: [
    {
      path: '/my', component: My
    },
    {
      path: '/friend', component: Friend
    }
  ]
})


Vue.config.productionTip = false

new Vue({
  render: h => h(App),
  // 注册路由
  router
}).$mount('#app')
